package summary.language;

/**
 * @AUTHOR LYF
 * @DATE 2022/3/5
 * @VERSION 1.0
 * @DESC
 */
public class FinalStaticDemo {
    static int a = 1;
    final static int b = 2;
    public static void main(String[] args) {
        int a = 10;
        a++;//就近原则
        FinalStaticDemo finalStaticDemo = new FinalStaticDemo();
        FinalStaticDemo.a++;
        //FinalStaticDemo.b++; //Cannot assign a value to final variable 'b'
        //t实际上会找到该类型调用
        System.out.println("a="+a+";t.a:"+finalStaticDemo.a+":"+FinalStaticDemo.a);
    }
}
